package com.isdepci.project.carbon.mapper;

import com.isdepci.project.carbon.domain.BGreenCertificate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 购买绿证Mapper接口
 *
 * @author isdepci
 * @date 2025-03-29
 */
public interface BGreenCertificateMapper
{

    // 按照年份查询
    List<BGreenCertificate> selectByYear(@Param("projectId") Long projectId, @Param("startYear") String startYear, @Param("endYear") String endYear);

    // 按照月份查询
    List<BGreenCertificate> selectByMonth(@Param("projectId") Long projectId, @Param("startMonth") String startMonth, @Param("endMonth") String endMonth);


    /**
     * 查询购买绿证
     */
     BGreenCertificate selectBGreenCertificateById(Long id);

    /**
     * 查询购买绿证列表
     */
     List<BGreenCertificate> selectBGreenCertificateList(BGreenCertificate bGreenCertificate);

    /**
     * 新增购买绿证
     */
     int insertBGreenCertificate(BGreenCertificate bGreenCertificate);

    /**
     * 修改购买绿证
     */
     int updateBGreenCertificate(BGreenCertificate bGreenCertificate);

    /**
     * 删除购买绿证
     */
     int deleteBGreenCertificateById(Long id);

    /**
     * 批量删除购买绿证
     */
     int deleteBGreenCertificateByIds(Long[] ids);


    void insertList(@Param("list") List<BGreenCertificate> list);


    List<BGreenCertificate> selectBGreenCertificateByProjectId(Long projectId);
}
